<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.18"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>HElib: /HElib/include/helib/debugging.h File Reference</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
		<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;1,700&family=Merriweather&family=Merriweather+Sans&family=Open+Sans&family=Poppins:ital@1&family=Roboto:ital,wght@0,400;1,300;1,900&display=swap" rel="stylesheet"> 
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body style="font-family: 'Merriweather', serif;">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">HElib Implementing Homomorphic Encryption</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_d0c4ae63660968bf6b1c77a1e8aecf95.html">helib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">debugging.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>debugging utilities  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;iostream&gt;</code><br />
<code>#include &lt;string&gt;</code><br />
<code>#include &lt;NTL/ZZX.h&gt;</code><br />
<code>#include &lt;<a class="el" href="_numb_th_8h_source.html">helib/NumbTh.h</a>&gt;</code><br />
</div>
<p><a href="debugging_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespacehelib"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehelib.html">helib</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:afe4ec1df211071f92cba15ca36078592"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="debugging_8h.html#afe4ec1df211071f92cba15ca36078592">FLAG_PRINT_ZZX</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:afe4ec1df211071f92cba15ca36078592"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5baf4ada763e6e93c45dca5a7da1071f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="debugging_8h.html#a5baf4ada763e6e93c45dca5a7da1071f">FLAG_PRINT_POLY</a>&#160;&#160;&#160;2</td></tr>
<tr class="separator:a5baf4ada763e6e93c45dca5a7da1071f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af044ab34c5a342e78f8a330e80f8dcfb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="debugging_8h.html#af044ab34c5a342e78f8a330e80f8dcfb">FLAG_PRINT_VEC</a>&#160;&#160;&#160;4   /* decode to ZZX */</td></tr>
<tr class="separator:af044ab34c5a342e78f8a330e80f8dcfb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7de40d96d5779033ef1cabed12b1833e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="debugging_8h.html#a7de40d96d5779033ef1cabed12b1833e">FLAG_PRINT_DVEC</a>&#160;&#160;&#160;8  /* decode to double float */</td></tr>
<tr class="separator:a7de40d96d5779033ef1cabed12b1833e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7d763a262ed6a677f1542f333e51d77"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="debugging_8h.html#ae7d763a262ed6a677f1542f333e51d77">FLAG_PRINT_XVEC</a>&#160;&#160;&#160;16 /* decode to complex numbers */</td></tr>
<tr class="separator:ae7d763a262ed6a677f1542f333e51d77"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aad44440822118a09af899ff2798464d3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehelib.html#aad44440822118a09af899ff2798464d3">helib::setupDebugGlobals</a> (SecKey *debug_key, const std::shared_ptr&lt; const EncryptedArray &gt; &amp;debug_ea, NTL::ZZX debug_ptxt=NTL::ZZX{})</td></tr>
<tr class="memdesc:aad44440822118a09af899ff2798464d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setup function for setting up the global debug variables.  <a href="namespacehelib.html#aad44440822118a09af899ff2798464d3">More...</a><br /></td></tr>
<tr class="separator:aad44440822118a09af899ff2798464d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa77bdb78bd529a55c239df60039e335"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehelib.html#aaa77bdb78bd529a55c239df60039e335">helib::cleanupDebugGlobals</a> ()</td></tr>
<tr class="memdesc:aaa77bdb78bd529a55c239df60039e335"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cleanup function for clearing the global debug variables.  <a href="namespacehelib.html#aaa77bdb78bd529a55c239df60039e335">More...</a><br /></td></tr>
<tr class="separator:aaa77bdb78bd529a55c239df60039e335"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a436a592900880109024757d11bb3949d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehelib.html#a436a592900880109024757d11bb3949d">helib::decryptAndPrint</a> (std::ostream &amp;s, const Ctxt &amp;ctxt, const SecKey &amp;sk, const EncryptedArray &amp;ea, long flags=0)</td></tr>
<tr class="separator:a436a592900880109024757d11bb3949d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a309c3ca72a6d812a3ea23d62e48e42bf"><td class="memItemLeft" align="right" valign="top">NTL::xdouble&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehelib.html#a309c3ca72a6d812a3ea23d62e48e42bf">helib::embeddingLargestCoeff</a> (const Ctxt &amp;ctxt, const SecKey &amp;sk)</td></tr>
<tr class="separator:a309c3ca72a6d812a3ea23d62e48e42bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb2f4d4c24b1b5926fc02206f9b5db6a"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehelib.html#aeb2f4d4c24b1b5926fc02206f9b5db6a">helib::realToEstimatedNoise</a> (const Ctxt &amp;ctxt, const SecKey &amp;sk)</td></tr>
<tr class="separator:aeb2f4d4c24b1b5926fc02206f9b5db6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac845c61472e33fa76df608e536b25b5a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehelib.html#ac845c61472e33fa76df608e536b25b5a">helib::checkNoise</a> (const Ctxt &amp;ctxt, const SecKey &amp;sk, const std::string &amp;msg, double thresh=10.0)</td></tr>
<tr class="separator:ac845c61472e33fa76df608e536b25b5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19a60ea778c6bbcc5d2732ca137c7e15"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehelib.html#a19a60ea778c6bbcc5d2732ca137c7e15">helib::decryptAndCompare</a> (const Ctxt &amp;ctxt, const SecKey &amp;sk, const EncryptedArray &amp;ea, const PlaintextArray &amp;pa)</td></tr>
<tr class="separator:a19a60ea778c6bbcc5d2732ca137c7e15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50b26a9740fbaba1c3b7b5c7e89ee55c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehelib.html#a50b26a9740fbaba1c3b7b5c7e89ee55c">helib::rawDecrypt</a> (NTL::ZZX &amp;plaintxt, const std::vector&lt; NTL::ZZX &gt; &amp;zzParts, const DoubleCRT &amp;sKey, long q=0)</td></tr>
<tr class="separator:a50b26a9740fbaba1c3b7b5c7e89ee55c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7844ba559695a1952e4d6309d21b354"><td class="memTemplParams" colspan="2">template&lt;typename VEC &gt; </td></tr>
<tr class="memitem:af7844ba559695a1952e4d6309d21b354"><td class="memTemplItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacehelib.html#af7844ba559695a1952e4d6309d21b354">helib::printVec</a> (std::ostream &amp;s, const VEC &amp;v, long nCoeffs=40)</td></tr>
<tr class="separator:af7844ba559695a1952e4d6309d21b354"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a742bf72a76d5b9389251abfee9223303"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehelib.html#a742bf72a76d5b9389251abfee9223303">helib::printZZX</a> (std::ostream &amp;s, const NTL::ZZX &amp;poly, long nCoeffs=40)</td></tr>
<tr class="separator:a742bf72a76d5b9389251abfee9223303"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a0d7d15973181b665a33077ca529f9d47"><td class="memItemLeft" align="right" valign="top">SecKey *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehelib.html#a0d7d15973181b665a33077ca529f9d47">helib::dbgKey</a> = nullptr</td></tr>
<tr class="separator:a0d7d15973181b665a33077ca529f9d47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f2eab09fe947de2ae6eb8328937f0bb"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; const EncryptedArray &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehelib.html#a1f2eab09fe947de2ae6eb8328937f0bb">helib::dbgEa</a> = nullptr</td></tr>
<tr class="separator:a1f2eab09fe947de2ae6eb8328937f0bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11275c94e69653c6ca1c5b3ea8f85dba"><td class="memItemLeft" align="right" valign="top">NTL::ZZX&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehelib.html#a11275c94e69653c6ca1c5b3ea8f85dba">helib::dbg_ptxt</a></td></tr>
<tr class="separator:a11275c94e69653c6ca1c5b3ea8f85dba"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>debugging utilities </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a7de40d96d5779033ef1cabed12b1833e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7de40d96d5779033ef1cabed12b1833e">&#9670;&nbsp;</a></span>FLAG_PRINT_DVEC</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FLAG_PRINT_DVEC&#160;&#160;&#160;8  /* decode to double float */</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a5baf4ada763e6e93c45dca5a7da1071f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5baf4ada763e6e93c45dca5a7da1071f">&#9670;&nbsp;</a></span>FLAG_PRINT_POLY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FLAG_PRINT_POLY&#160;&#160;&#160;2</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="af044ab34c5a342e78f8a330e80f8dcfb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af044ab34c5a342e78f8a330e80f8dcfb">&#9670;&nbsp;</a></span>FLAG_PRINT_VEC</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FLAG_PRINT_VEC&#160;&#160;&#160;4   /* decode to ZZX */</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ae7d763a262ed6a677f1542f333e51d77"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7d763a262ed6a677f1542f333e51d77">&#9670;&nbsp;</a></span>FLAG_PRINT_XVEC</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FLAG_PRINT_XVEC&#160;&#160;&#160;16 /* decode to complex numbers */</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="afe4ec1df211071f92cba15ca36078592"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe4ec1df211071f92cba15ca36078592">&#9670;&nbsp;</a></span>FLAG_PRINT_ZZX</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FLAG_PRINT_ZZX&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
        <script type="text/javascript" src="doxy-boot.js"></script>
</html>
